-
Notifications
You must be signed in to change notification settings - Fork 52
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[WIP] BROOKLYN-535: restarter policy when entity stopping #829
base: master
Are you sure you want to change the base?
[WIP] BROOKLYN-535: restarter policy when entity stopping #829
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I know this is marked as WIP, but I tested it and it failed for 2 reasons:
- the missing
return
(see my comment) - the expected state set to
on-fire
where it should be stopped. There is a discussion to fix this on the mailing list
But once those are fixed, it should be good to go 👍
@@ -133,6 +135,10 @@ protected synchronized void onDetectedFailure(SensorEvent<Object> event) { | |||
LOG.warn("ServiceRestarter suspended, so not acting on failure detected at "+entity+" ("+event.getValue()+")"); | |||
return; | |||
} | |||
if (isEntityStopping()) { | |||
highlightViolation("Failure detected but entity stopping"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we highlight the violation here? I guess the question is more: is it really a violation when we are in a stopping state?
@@ -133,6 +135,10 @@ protected synchronized void onDetectedFailure(SensorEvent<Object> event) { | |||
LOG.warn("ServiceRestarter suspended, so not acting on failure detected at "+entity+" ("+event.getValue()+")"); | |||
return; | |||
} | |||
if (isEntityStopping()) { | |||
highlightViolation("Failure detected but entity stopping"); | |||
LOG.info("Entity stopping, so ServiceRestarter not acting on failure detected at "+entity+" ("+event.getValue()+")"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You are missing a return;
@aledsage Do you think you can look at my comments above? |
See https://issues.apache.org/jira/browse/BROOKLYN-534